package org.jivesoftware.smackx.pubsub;

import org.jivesoftware.smack.packet.PacketExtension;

public class Item
  implements PacketExtension
{
  private String id;

  public Item(String paramString)
  {
    this.id = paramString;
  }

  public String getElementName()
  {
    return "item";
  }

  public String getId()
  {
    return this.id;
  }

  public String getNamespace()
  {
    return null;
  }

  public String toString()
  {
    return super.getClass().getName() + " | Content [" + toXML() + "]";
  }

  public String toXML()
  {
    StringBuilder localStringBuilder = new StringBuilder("<item");
    if (this.id != null)
    {
      localStringBuilder.append(" id='");
      localStringBuilder.append(this.id);
      localStringBuilder.append("'");
    }
    localStringBuilder.append("/>");
    return localStringBuilder.toString();
  }
}